---
title: Configuring SCIM Directory Sync with Okta
updatedAt: 2023-08-16
summary: For Dub Enterprise users, you can automatically provision and deprovision users from your Okta directory to Dub using SCIM Directory Sync.
author: steventey
categories:
  - saml-sso
related:
  - okta-saml
  - azure-saml
  - azure-scim
excludeHeadingsFromSearch: true
---

<Note variant="success">
  This feature is only available on [Dub Enterprise](/pricing).
</Note>

For Dub Enterprise users, you can automatically provision and deprovision users from your Okta directory to Dub using [SCIM Directory Sync](https://developer.okta.com/docs/concepts/scim/).

<Prerequisites>

Before you can configure SCIM Directory Sync, you need to create a SAML application in Okta. See [Configuring SAML SSO with Okta](okta-saml) for more information.

</Prerequisites>

## Step 1: Configure Directory Sync on Dub

In your project dashboard on Dub, click on the **Settings** tab in the menu bar at the top. Then, click on the **Security** tab in the sidebar.

<Image
  alt="Directory Sync section on the Dub Dashboard"
  src="https://d2vwwcvoksz7ty.cloudfront.net/help/scim-directory-sync.png"
  width={2576}
  height={1608}
  hideCaption={true}
/>

Under the **Directory Sync** section, click on **Configure**. This will open up the Directory Sync modal:

1. Select **Okta** as the Directory Provider.
2. Click **Save changes**.

<Image
  alt="SCIM Modal"
  src="https://d2vwwcvoksz7ty.cloudfront.net/help/okta-scim-modal.png"
  width={1778}
  height={1182}
  hideCaption={true}
/>

This will generate a Directory Sync connection for your Dub project, and return 2 values, which will be needed in Step 2:

1. **SCIM 2.0 Base URL**
2. **OAuth Bearer Token**

<Image
  alt="SCIM Modal Configured"
  src="https://d2vwwcvoksz7ty.cloudfront.net/help/okta-scim-modal-configured.png"
  width={1964}
  height={1356}
  hideCaption={true}
/>

## Step 2: Add Provisioning to SAML Application

Go to the **General** tab of your existing Dub Okta SAML application that you want to enable SCIM provisioning for. Under **App Settings** click **Edit**.

<Image
  alt="General tab of Okta SAML application"
  src="https://d2vwwcvoksz7ty.cloudfront.net/help/okta-scim-general.png"
  width={2978}
  height={1600}
  hideCaption={true}
/>

Select the "Enable SCIM provisioning" option and click **Save**.

<Image
  alt="Enable SCIM provisioning"
  src="https://d2vwwcvoksz7ty.cloudfront.net/help/okta-scim-enable.png"
  width={1670}
  height={1506}
  hideCaption={true}
/>

You should now see a **Provisioning** tab. Select it and click **Edit**.

<Image
  alt="Provisioning tab of Okta SAML application"
  src="https://d2vwwcvoksz7ty.cloudfront.net/help/okta-scim-provisioning.png"
  width={2976}
  height={1640}
  hideCaption={true}
/>

1. Under the **SCIM connector base URL** field, enter the **SCIM 2.0 Base URL** value from Step 1.

2. Under **Unique identifier field for users**, enter `userName`.

<CopyBox title="Copy this unique identifier" copy="userName" />

3. Under **Supported provisioning actions**, select the following options:

- Push New Users
- Push Profile Updates
- Push groups

4. Under **Authentication Mode**, select **HTTP Header**.

5. Copy & paste the **OAuth Bearer Token** value from Step 1 into the **Authorization** field.

<Image
  alt="Configure SCIM provisioning"
  src="https://d2vwwcvoksz7ty.cloudfront.net/help/okta-scim-connection.png"
  width={2084}
  height={1692}
  hideCaption={true}
/>

Click "Test Connector Configuration" to verify that the connection is working, and then click "Save".

## Step 3: Configure Provisioning Actions

Under the **To App** section, click **Edit**.

Check the following options, and click **Save**:

- Create Users
- Update User Attributes
- Deactivate Users

<Image
  alt="SCIM Provisioning Actions"
  src="https://d2vwwcvoksz7ty.cloudfront.net/help/okta-scim-actions.png"
  width={2218}
  height={1688}
  hideCaption={true}
/>

## Step 4: Assign Users

Once you've configured Directory sync, you can assign users to Dub directly within Okta.

Click on the **Assignments** tab, and click **Assign**. You can choose to assign users individually, or assign them in bulk by group.

<Image
  alt="Assigning users in Okta"
  src="https://d2vwwcvoksz7ty.cloudfront.net/help/okta-saml-assign.png"
  width={2346}
  height={1562}
  hideCaption={true}
/>

Select the users or groups you want to assign and click **Assign**.

<Image
  alt="Assigning users in Okta choose users"
  src="https://d2vwwcvoksz7ty.cloudfront.net/help/okta-saml-choose.png"
  width={1564}
  height={1356}
  hideCaption={true}
/>

In the next screen, scroll to the bottom and click **Save and Go Back**.

<Image
  alt="Saving Okta assignment"
  src="https://d2vwwcvoksz7ty.cloudfront.net/help/okta-saml-save.png"
  width={3132}
  height={2008}
  hideCaption={true}
/>

Your assigned users should now receive an invitation email to join your Dub project.

<Image
  alt="SAML invite email"
  src="https://d2vwwcvoksz7ty.cloudfront.net/help/saml-invite.png"
  width={2226}
  height={1564}
  hideCaption={true}
/>

They will also be able to sign in to Dub using Okta SSO.
